﻿@using NewRen.Models;
@using NewRen.Models.ViewModel;
@model  NewRen.Models.UserGroup
@{
    UserGroup group = ViewBag.Group as UserGroup;
    ViewBag.Title = "牛棚信息修改-牛棚修改";
    List<Images> images = ViewBag.Images;
    Layout = "~/Views/Shared/_Layout_UserGroup.cshtml";

}
<div class="ucenter-left account-left-border">
    <div class="ucneter-l-head cf">
        <div class="ulhead-headicon">
            @if (group.Picture == null)
            {
                <img src="/Images/userphoto.png" width="50" height="50"
                     alt=@group.LoginName style="border-radius:50%;" />
            }
            else
            {
                <img src="/UserGroup/ShowPicture/@group.ID" width="50"
                     alt=@group.LoginName height="50" style="border-radius:50%;" />
            }

        </div>
        <div class="ulhead-info">
            <p class="ulhead-info-uname">@group.GroupName</p>

            <div class="ulhead-info-tool">
                <a class="ulhead-icon icon-lock ucenter-mail " href="/UserGroup/PwdEdit/@group.ID" title="修改密码">
                    <div class="ucenter-mail-tip">修改密码</div>
                </a>
                <a href="/UserGroup/Edit/@group.ID"
                   class="ulhead-icon icon-setting ucenter-mail" title="设置牛棚信息"></a>
            </div>
        </div>
    </div>
    <div class="ucenter-l-list">
        <ul class="ullist-ul">
            <li id="uclick">
                <a href="/UserGroup/Show/@group.ID">牛棚中心</a>
            </li>
            <li id="uclick1" class="active">
                <a href="/UserGroup/Edit/@group.ID">牛棚设置</a>
            </li>
            <li id="uclick2">
                <a href="/UserGroup/UserManager/@group.ID">牛棚牛人</a>
            </li>
        </ul>
    </div>
</div>
<div class="ucenter-right cf">
    <div class="ucenter-right-head">
        <span class="ucenter-right-head-show"><a href="/UserGroup/Edit/@group.ID">信息修改</a></span>
        <span class="ucenter-right-head-show"><a href="/UserGroup/PwdEdit/@group.ID">密码修改</a></span>
        <span class="ucenter-right-head-show"><a href="/UserGroup/PictureEdit/@group.ID">更换头像</a></span>
        <span class="ucenter-right-head-selected"><a href="/UserGroup/GroupPictureShow/@group.ID">宣传图片</a></span>
    </div>
    <div class="tabGroup">
        @using (Html.BeginForm("AddGroupPicture", "Usergroup", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            @Html.AntiForgeryToken()
            @Html.HiddenFor(model => model.ID, new { @value = group.ID })
            <div class=" form-item">
                <div class="item-label">
                    <label>宣传图片：</label>
                </div>
                <div class="item-img-ls">
                    @if (images.Count > 0)
                    {
                        foreach (Images item in images)
                        {
                            <div class="group_img_show" id="img_@item.ID">
                                <img src="@item.Path" class="product_list_img" width="120" height="120">
                                <a href="javascript:deleteDialog('/UserGroup/DelGroupPicture/@item.ID?sid=@ViewBag.SID','img_@item.ID');" class="group_img_del">删除</a>
                            </div>
                        }
                    }
                    else
                    {
                        <span class="defInfo">暂无图片</span>
                    }
                </div>
            </div>
            <div class=" form-item">
                <div class="item-label">
                    <label>本地上传：</label>
                </div>
                <div class="item-span">
                    <input id="fileupload" type="file" name="file" style="border:0">
                </div>
            </div>
            <div class=" form-item">
                <div class="item-label">
                    <label></label>
                </div>
                <div class="item-span">
                    <input type="submit" value="上传" class="btn">
                </div>
            </div>
        }
    </div>
</div>